{
PROB : newbarn
LANG : PASCAL
ID : phamnamlo2
}
program NEWBARN;
const
  fi = 'newbarn.in';
  fo = 'newbarn.out';
  max = 10000;
type
  point = record
            x, y : longint;
          end;
var
  p : array[1..max] of point;
  n, sdis : longint;

procedure inp;
var
  i : longint;
begin
  read(n);
  for i := 1 to n do
    with p[i] do read(x, y);
end;

procedure swap(x, y : longint);
var
  temp : point;
begin
  temp := p[x];
  p[x] := p[y];
  p[y] := temp;
end;

procedure sortx(l, r : longint);
var
  i, j : longint;
  k : point;
begin
  if l >= r then exit;
  i := l;
  j := r;
  k := p[l+random(r-l+1)];
  repeat
    while p[i].x < k.x do inc(i);
    while p[j].x > k.x do dec(j);
    if i <= j then
    begin
      swap(i, j);
      inc(i);
      dec(j);
    end;
  until i > j;
  sortx(i, r);
  sortx(l, j);
end;

procedure sorty(l, r : longint);
var
  i, j : longint;
  k : point;
begin
  if l >= r then exit;
  i := l;
  j := r;
  k := p[l+random(r-l+1)];
  repeat
    while p[i].y < k.y do inc(i);
    while p[j].y > k.y do dec(j);
    if i <= j then
    begin
      swap(i, j);
      inc(i);
      dec(j);
    end;
  until i > j;
  sorty(i, r);
  sorty(l, j);
end;

procedure process;
var
  i, v, l, h : longint;
begin
  sdis := 0;
  if odd(n) then
  begin
    v := n div 2 + 1;
    sortx(1, n);
    for i := 1 to n do inc(sdis, abs(p[i].x - p[v].x));
    sorty(1, n);
    for i := 1 to n do inc(sdis, abs(p[i].y - p[v].y));
    writeln(sdis, ' ', 0);
  end
  else
  begin
    v := n div 2;
    sortx(1, n);
    for i := 1 to n do inc(sdis, abs(p[i].x - p[v].x));
    l := p[v+1].x - p[v].x + 1;
    sorty(1, n);
    for i := 1 to n do inc(sdis, abs(p[i].y - p[v].y));
    h := p[v+1].y - p[v].y + 1;
    writeln(sdis, ' ', l*h-2);
  end;
end;

begin
  assign(input, fi); reset(input);
  assign(output, fo); rewrite(output);

  inp;
  process;

  close(output);
  close(input);
end.
